'use strict'

const Sequelize = require('sequelize');

//连接数据库
const sequelize = new Sequelize('mssql','sa','123456',{
    host:'localhost',
    dialect:'mssql'
});

sequelize
    .authenticate()
    .then(()=>{
        console.log('Connection has been estalished successfully');
    })
    .catch(err=>{
        console.log('Unable to connect to the database:',err);
    });

module.exports = sequelize;